home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
online
/
source
/
c
/
compilers
/
Bob 1.5.sit.hqx
/
Bob 1.5
/
Y.bob
< prev
Wrap
Text File
|
1993-10-02
|
382b
|
24 lines
main()
{
hello = "hello";
goodbye = "goodbye";
for (i = 0; i < 3000; ++i) {
x = hello + ' ' + goodbye;
hello = substr(x,0,5);
goodbye = substr(x,6,7);
}
print(x,"\n");
}
substr(s,f,l; len,r,i)
{
len = sizeof(s) - f;
if (l > len)
l = len;
if (l <= 0) return "";
r = newstring(l);
for (i = 0; --l >= 0; )
r[i++] = s[f++];
return r;
}